main(){
    
    echo "==================== start clean docker containers logs =========================="
    logs=$(sudo find /data/docker_storage/containers -name *-json.log)
    total=0
    for log in $logs
            do
                    echo "clean logs : $log"
                    size=`sudo du -b $log | awk '{print $1}'`
                    sudo sh -c  "cat /dev/null > $log"
                    
                    echo "大小：$size"
                    if [ $size -gt 0 ];then
                        let total=$total+$size         
                    fi
                    
            done
    echo "释放空间：$((total/1024/1024))MB"
    
    
    echo "==================== end clean docker containers logs   =========================="
}
main